package types

import "errors"

// Common errors for the smart snapshotter
var (
	// Storage errors
	ErrStorageNotFound     = errors.New("storage: not found")
	ErrStorageCorrupted    = errors.New("storage: data corrupted")
	ErrStorageFull         = errors.New("storage: storage full")
	ErrStorageUnavailable  = errors.New("storage: unavailable")

	// Deduplication errors
	ErrDedupNotFound       = errors.New("dedup: data not found")
	ErrDedupHashMismatch   = errors.New("dedup: hash mismatch")
	ErrDedupInvalidData    = errors.New("dedup: invalid data")

	// Cache errors
	ErrCacheMiss           = errors.New("cache: miss")
	ErrCacheFull           = errors.New("cache: cache full")
	ErrCacheExpired        = errors.New("cache: expired")

	// Loader errors
	ErrLayerNotFound       = errors.New("loader: layer not found")
	ErrPathNotFound        = errors.New("loader: path not found")
	ErrLoadingTimeout      = errors.New("loader: loading timeout")
	ErrLoadingFailed       = errors.New("loader: loading failed")

	// Configuration errors
	ErrInvalidConfig       = errors.New("config: invalid configuration")
	ErrConfigNotFound      = errors.New("config: configuration not found")

	// General errors
	ErrNotImplemented      = errors.New("not implemented")
	ErrInvalidArgument     = errors.New("invalid argument")
	ErrInternal            = errors.New("internal error")
	ErrNotSupported        = errors.New("not supported")
)